import java.util.Arrays;
import java.util.*;
import java.io.*;
public class Test1 {
    public static void main1(String[] args){
        int count=0;
        for(int i =1;i<=100;i++){
            if(count%5==0){
                System.out.println();
            }
            if(i%2==0){
                System.out.print(i+" ");
                count++;
            }

        }
    }
    public static void main2(String[] args){

        for(int i =0;i<5;i++){
            for(int j=0;j<3*i;j++){
                System.out.print(" ");
            }
            for(int k=0;k<5;k++){
                System.out.print("*"+" "+" ");
            }
            System.out.println();

        }
    }
    public static void main3(String[] args){
        int[][] arr = new int[][]{{1,2,3},{4,5,6},{7,8,9}};
        int[][] acc = new int[arr.length][arr[0].length];
        for(int i =0;i<arr.length;i++){
            for(int j =0;j<arr[0].length;j++){
                acc[j][i]=arr[i][j];
            }
        }
        for (int i =0;i< arr.length;i++) {
            System.out.print(Arrays.toString(acc[i]));
        }
    }
//大大
    public static void main5(String[] args) {
        String s1 ="HelloWorld";
        StringBuffer  stringBuffer = new StringBuffer();
        for(int i=s1.length()-1;i>=0;i--){
            char ch = s1.charAt(i);
            if(ch>='a'&&ch<='z'){
                ch-=32;
            }
            else if(ch>='A'&&ch<='Z'){
                ch+=32;
            }
          stringBuffer.append(ch);
        }
       System.out.print(stringBuffer.toString());
    }

    public static void main6(String[] args) {
        StringBuffer s1 = new StringBuffer();
        StringBuffer s2 = new StringBuffer(4);
        StringBuffer s3 = new StringBuffer("12345");
        System.out.println(s1.length()+" "+s1.capacity());
        System.out.println(s2.length()+" "+s2.capacity());
        System.out.println(s3.length()+" "+s3.capacity());
    }
    public static void main7(String[] args){
        Random random = new Random();
        for(int i =0;i<5;i++){
            int n = 20+(random.nextInt(11));
            System.out.println(n);
        }
    }

    public static void main8(String[] args) {
        int width=10;
        int height=5;
        StringBuffer s1= new StringBuffer();
        for (int i = 0; i < height; i++) {
            for (int j = 0; j < width; j++) {
                s1.append("%");
            }
        }

     int count=0;
          for (int j =0;j<s1.length();j++){
              if(count%10==0){
                  System.out.println();
              }
              char ch = s1.charAt(j);
              System.out.print(ch);
              count++;
          }
    }

    public static void main9(String[] args) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.YEAR,2023);
        calendar.set(Calendar.MONTH,Calendar.JANUARY);
        calendar.set(Calendar.DAY_OF_MONTH,1);
        calendar.add(Calendar.DAY_OF_MONTH,180);
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH)+1;
        int day = calendar.get(Calendar.DAY_OF_MONTH);
        System.out.println(year);
        System.out.println(month);
        System.out.println(day);
    }

    public static void main(String[] args) throws IOException {
        InputStream inputStream = new FileInputStream("src1.txt");
        OutputStream outputStream = new FileOutputStream("src2.txt");
        int len= 0;
      byte[] arr=new byte[1024];
      while((len=inputStream.read(arr))!=-1){
          outputStream.write(arr);
      }
      inputStream.close();
      outputStream.close();
    }
}
